<template>
    <div>
        <el-row v-for="i in a" :key="i.gmtCreate" class="hi">
            <el-col :span="9">
                <div class="left">
                    <h2>{{i.job}}</h2>
                    <label class="salary">{{i.salary}}/月</label>
                    <label>{{i.education}}</label>
                    <label>{{i.jobexp}}</label>
                    <label>{{i.city}}</label>
                </div>
            </el-col>
            <el-col :span="9">
                <div>
                    <h2>{{i.companyname}}</h2>
                    <label>{{i.jobsepecial}}</label>
                    <label>{{i.companycomment}}</label>
                    <label>{{i.gmtCreate}}</label>
                </div>
            </el-col>
            <el-col :span="6">
                <div>
                    <el-button class="look" @click="openVR(i.id)">查看已收简历</el-button>
                </div>
            </el-col>
        </el-row>
    </div>
</template>

<script>
export default {
    name:'existingRecruitment',
    data(){
       return{
        a:[],
        // ResumeReceived:[]
       }
    },
    methods:{
        openVR(id){
            console.log(id);
            this.bus.$emit("sendId",id)
            this.$router.push("/ViewResume")
            //   depot.get({
            //     url: '/empservice/link/getRecruitmentByRid/'+id,
            //     data:{
            //         "id": id,
            //     },
            //     cb: (res)=> {
            //         // console.log("查看已收简历",res.data.list);
            //         this.ResumeReceived = res.data.list
            //         console.log("已有招聘获取的简历列表：",this.ResumeReceived);
                    
            //          //！！！！！！！！！！！！！！！！！将获取的数据传给同级组件ViewResume
            //         this.bus.$emit('RR', this.ResumeReceived);
            //     }
            //     })
        },
        exitRec(current,limit){
           depot.post({
                url: 'empservice/recruitment/getAllRecruitment/'+current+"/"+limit,
                cb: (res)=> {
                    // console.log("已有招聘",res);
                    let list = res.data.list;
                    this.a = list
                }
                })
        },
    },
    mounted:function () {
        this.exitRec(1,100);
    },
    activated(){
             this.exitRec(1,100);
            // console.log('实例被激活时使用，用于重复激活一个实例的时候')
    },
    deactivated(){
            // console.log('实例没有被激活时')
    },
    destroyed(){
       
    }
}
</script>

<style lang="less" scoped>
  .el-row {
    padding-left: 40px;
    width: 100%;
    &:last-child {
      margin-bottom: 0;
    }
  }
  .hi{
        border-bottom: 1px solid rgb(182, 182, 182);
  }
  .el-col {
    margin-top: 20px;
    .salary{
        color: #d28039;
        font-size: 25px;
    }
    border-radius: 4px;
    h2{
        color: #3db3b7;
        margin: 0;
        }
    label{
        margin-right: 30px;
        opacity: 0.7;
    }
    .look{
        margin-top: 10px;
        margin-left: 100px;
        background-color: #3db3b7;
        color: #fff;
        border-radius: 0;
    }
  } 
</style>